const zhangshan = {
  name: "张三",
  sayHi() {
    //   zhangshan
    console.log(this);
  },
  wait() {
    setTimeout(function () {
      // this === window
      console.log(this);
    });
  },
  waitAgain() {
    setTimeout(() => {
      //zhangshan
      console.log("箭头函数", this);
    });
  },
  get: function () {
    console.log("get", this); // zhangshan
  },
};

zhangshan.sayHi();
zhangshan.wait();
zhangshan.waitAgain();
zhangshan.get();
